#static-lib=libmymath.a
#
#$(static-lib):Add.o Sub.o Mul.o Div.o
#	ar -rc $@ $^
#
##Test:Add.o Sub.o Mul.o Div.o TestMain.o
##	gcc -o $@ $^
#%.o:%.c
#	gcc -c $<
#
#.PHONY:output
#output:
#	mkdir -p mymath_lib/include
#	mkdir -p mymath_lib/lib
#	cp -f *.h mymath_lib/include
#	cp -f *.a mymath_lib/lib
#
#.PHONY:clean
#clean:
#	rm -rf *.o *.a mymath_lib



dy-lib=libmymath.so

$(dy-lib):Add.o Sub.o Div.o Mul.o TestMain.o
	gcc -shared -o $@ $^

%.o:%.c
	gcc -fPIC -c $<

.PHONY:output
output:
	mkdir -p mymath_lib/include
	mkdir -p mymath_lib/lib
	cp -f *.h mymath_lib/include
	cp -f *.so mymath_lib/lib

.PHONY:clean
clean:
	rm -rf *.o *.so mymath_lib
